<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>化工职业技术学院图书管理</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css"/>
    <script src="/js/jquery-3.5.1.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <style>
        .div1{
            width: 50%;
            height: 500px;
            margin: 0 auto;
        }
    </style>
</head>
<body>
    <div class="div1">
        <h1>读书使人进步</h1>
        <hr>
        <form action="/homepage/addrecordbook" method="get">
            <div class="form-group">
                <label for="bookid">出借书籍编号</label>
                <input type="text" class="form-control" id="bookid" placeholder="bookid" name="id">
            </div>
            <button type="submit" class="btn btn-default">搜索</button>
        </form>
        <hr>
        <h2 th:text="${msg}"></h2>
    <form action="/homepage/addrecord" method="post" th:if="${book!=null}">
        <div class="form-group">
            <label for="id">书籍编号</label>
            <input type="text" class="form-control" id="id"  name="id" placeholder="id"  th:value="${book.id}">
        </div>
        <div class="form-group">
            <label for="name">书籍名字</label>
            <input type="text" class="form-control" id="name"  name="bookname" placeholder="bookname" th:value="${book.bookname}">
        </div>
        <div class="form-group">
            <label for="whirte">书籍作者</label>
            <input type="text" class="form-control" id="whirte" name="author" placeholder="作者" th:value="${book.author}">
        </div>
        <div class="form-group">
            <label for="press">书籍出版社</label>
            <input type="text" class="form-control" id="press" name="press" placeholder="出版社" th:value="${book.press}">
        </div>
        <div class="form-group">
            <label for="price">书籍价格</label>
            <input type="text" class="form-control" id="price" name="price" placeholder="价格" th:value="${book.price}">
        </div>
        <div class="form-group">
            <label for="date">出借日期</label>
            <input type="date" class="form-control" id="date" name="lendtime">
        </div>
        <button type="submit" class="btn btn-default">确认借出</button>
      </form>
    </div>
</body>
</html>